<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>车站信息修改</title>
<link href="<%=request.getContextPath()%>/css/css.css" rel="stylesheet" type="text/css">
<script>
function editTicket(){
	 var form = document.ticketForm;
	 form.action="<%=request.getContextPath()%>/DoEditStationServlet.do";

		 if(confirm("是否修改？")){
			 form.submit();
		 }
		
	 
}
</script>
</head>

<body class="write_bg">
<!-- 1.在form表单中，如果要执行文件上传（即包含有文件域），需要修改form表单的默认编码为：enctype="multipart/form-data"
 	 2.默认的格式是：application/x-www-form-urlencoded
 	 3.使用multipart/form-data编码数据后，不能在servlet中直接使用request.getParameter()方法获取参数，
 	   每一个输入项都是以文件流（不再以字符串）形式传递的
 	 4.
 
 -->
<form name="ticketForm" enctype="multipart/form-data" action="" method="post">
  <table width="100%" border="0" cellspacing="0">
    <tr>
      <td height="30"></td>
    </tr>
  </table>
  <table width="835" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="20" colspan="2" ></td>
  </tr>
  <tr>
    <td width="64" ></td>
    <td width="794" height="30" valign="top" class="text_blod_title">修改车站信息</td>
  </tr>
  <tr>
    <td height="15" colspan="2" ><img src="<%=request.getContextPath()%>/images/line1.jpg" width="835" height="6"></td>
    </tr>
  <tr>
    <td colspan="2" background="../images/wb_01 (3).jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="64">&nbsp;</td>
        <td width="771" height="25" align="left" class="text_cray">注：标有 <span class="text_red">*</span> 处，均为必填项</td>
      </tr>
      <tr>
        <td height="20" colspan="2">&nbsp;</td>
        </tr>
    </table>
        <table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td height="15" colspan="4" align="left" class="text_title">车站信息</td>
          </tr>
          <tr>
            <td height="10" colspan="4" ></td>
          </tr>
          
          <tr>
            <td width="20" align="center" class="text_red1"></td>
            <td width="100" height="40" align="left" class="text_cray1">ID：
            	<input type="text" readonly="readonly" disabled="true" value="${station.stationId}"/>
            	<input type="hidden" name="id" id="id" value="${station.stationId}"/>
            </td>
          </tr>
          
          <tr>
            <td width="20" align="center" class="text_red1"></td>
            <td width="100" height="40" align="left" class="text_cray1">车站名：
            
            <input  name="stationName" id="stationName" value="${station.stationName}"/>
            </td>
          </tr>
          <tr>
            <td height="20" colspan="3"></td>
          </tr>
        
          <tr>
            <td height="10" colspan="3"></td>
          </tr>
     
        </table>
      <table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td height="20" colspan="6"></td>
          </tr>
          <tr>
            <td height="10" colspan="6" ></td>
          </tr>
          <tr>
            <td align="center" class="text_red">*</td>
            <td width="100" height="40" align="left" class="text_cray1">省 份：</td>
            <td>&nbsp;</td>
            <td align="left" class="text_cray">
          		<select name="stationProvince" class="text_cray" id="province">
                	<option value="省份" selected="selected">省份</option>
           		</select> 
            </td>
          </tr>
           <c:if test="${empty station.stationImage}">
           		 <td width="239" rowspan="6" align="center" ><img src="<%=request.getContextPath()%>/images/photo.jpg" width="120" height="120"></td>
            </c:if>
            <c:if test="${not empty station.stationImage}">
           		 <td width="239" rowspan="6" align="center" ><img src="<%=request.getContextPath()%>/${station.stationImage}" width="120" height="120"></td>
            </c:if>
              <tr>
            <td width="20" align="center" class="text_red">*</td>
            <td width="100" height="40" align="left" class="text_cray1">内部照片：</td>
            <td colspan="4" class="text_cray"><input name="field1" type="file" class="text_cray" id="field1" value="王小明"/></td>
          </tr>
          
       
          
          
         
        </table>
      <table width="100%" border="0" cellspacing="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table>
    </table>
  <table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="164">&nbsp;</td>
      <td width="99" height="30" align="center"><input  type="button" class="buttj" id="button"value="" onclick=editTicket()></td>
      <td width="98" align="center">&nbsp;</td>
      <td width="97" align="center"><input  type="reset" class="butcz" id="button2"value=""></td>
      <td width="92" align="center">&nbsp;</td>
    </tr>
  </table>  
  <table width="100%" border="0" cellspacing="0">
  <tr>
    <td height="20">&nbsp;</td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0">
  <tr>
    <td height="2" background="<%=request.getContextPath()%>/images/bottom_point.gif"></td>
  </tr>
  <tr>
    <td height="25" align="center" background="<%=request.getContextPath()%>/images/bottom_ny_bg.gif" class="text_cray">copyright@12306 购票网</td>
  </tr>
</table>
</td>
  </tr>
</table>
</form>

<script type="text/JavaScript" src="<%=request.getContextPath()%>/js/common.js"></script>
</body>
</html>
